#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
int DeleteWords(char s1[], char s2[])
{
    int i = 0, j = 0, num = 0;
    int l = strlen(s1), r = strlen(s2);
    for (i = l - 2, j = r - 1; j >= 0; j--)
    {
        if (s1[i] != s2[j])
        {
            return 0;
        }
        else
        {
            i--;
        }
    }
    char s3[110] = { 0 };
    for (int k = l - 1; k >= 0; k--)
    {
        if (s1[k] == ' ')
            num++;
        if (num >=r)
            s3[k] = s1[k];
    }
    int t = strlen(s3);
    s3[t - 1] = '.';
    strcpy(s1, s3);
    return 1;
}

int main()
{
    char s1[101], s2[21];
    gets(s1);
    gets(s2);
    if (DeleteWords(s1, s2))
        puts(s1);
    else
        printf("No delete!\n");
    return 0;
}
